﻿#region Copyright Information
// // ****************************************************************
// // Feel free to extend or modify the code of the application to your needs. 
// // But remember do it for the Glory of our Lord Jesus Christ
// // ****************************************************************
#endregion

#region Usings

using System.Collections.Generic;
using Data.Configuration;

#endregion

namespace Interfaces.Configuration
{
	/// <summary>
	/// Manages the configuration settings for the entire application.
	/// </summary>
	public interface IConfigurationManager
	{
		/// <summary>
		/// Add a item to the configuration file.
		/// </summary>
		/// <param name="item">The configuration item.</param>
		void AddItem(ConfigurationItem item);

		/// <summary>
		/// Deletes a item by name.
		/// </summary>
		/// <param name="name">The name of the item.</param>
		void DeleteItem(string name);

        /// <summary>
        /// Update the specified item.
        /// </summary>
        /// <param name="item">The name of the configuration item.</param>
        void UpdateItem(ConfigurationItem item);

        /// <summary>
        /// Return an item with the specified name.
        /// </summary>
        /// <param name="name">The name of the configuration item.</param>
        /// <returns>Configuration item.</returns>
	    ConfigurationItem GetItem(string name);

        /// <summary>
        /// Returns all the items in the configuration file.
        /// </summary>
        /// <returns>List of configuration items.</returns>
	    IEnumerable<ConfigurationItem> GetAllItems();

		/// <summary>
		/// Save the configuration file to disk.
		/// </summary>
		/// <param name="filePath">The path to save the file.</param>
		void Save(string filePath);
	}
}